package com.ds.server;
import java.rmi.Remote;
import java.rmi.RemoteException;
import com.ds.support.GameInfo;
import com.ds.support.GameStatus;

public interface RMIServerFramwork extends Remote { 
	// to allow player to join the game
	// get the user's specific car as an input
	// return back the allocated ID for the user
    public int register(int carType) throws RemoteException;
    
    // to allow players to control their car by passing their ID
    // and the corresponding movement
    public void moveCar(int carID, String move) throws RemoteException;
    
    // to get the game information 
    public GameInfo getGameInfo() throws RemoteException;
    
    // to get the status of the game: READY, RUNING or CLOSE
    public GameStatus getGameStatus(int carID) throws RemoteException;
    
    // to get the ID of the game's winner
    public int getWinner() throws RemoteException;
    
    // to notice the server that the player has quit the game
    public void removeMyself(int carID) throws RemoteException;
}